In computing, a dialog box (also simply dialog) is a graphical control element in the form of a small window that communicates information to the user and prompts them for a response.
Dialog boxes are classified as "Modal window" or "modeless", depending on whether they block interaction with the software that initiated the dialog. The type of dialog box displayed is dependent upon the desired user interaction.
The simplest type of dialog box is the alert, which displays a message and may require an acknowledgment that the message has been read, usually by clicking "OK", or a decision as to whether or not an action should proceed, by clicking "OK" or "Cancel". Alerts are also used to display a "termination notice"—sometimes requesting confirmation that the notice has been read—in the event of either an intentional closing or unintentional closing ("crash") of an application or the operating system. (, "Gedit has encountered an error and must close.") Although this is a frequent interaction pattern for modal dialogs, it is also criticized by usability experts as being ineffective for its intended use, which is to protect against errors caused by destructive actions, and for which better alternatives exist.
An example of a dialog box is the about box found in many software programs, which usually displays the name of the program, its version number, and may also include copyright information.
In general, good software design calls for dialogs to be of this type where possible, since they do not force the user into a particular mode of operation. An example might be a dialog of settings for the current document, e.g. the background and text colors. The user can continue adding text to the main window whatever color it is, but can change it at any time using the dialog. (This isn't meant to be an example of the best possible interface for this; often the same functionality may be accomplished by toolbar buttons on the application's main window.)
A modal dialog interrupts the main workflow. This effect has either been sought by the developer because it focuses on the completion of the task at hand or rejected because it prevents the user from changing to a different task when needed.
In macOS, prior to macOS Big Sur, dialogs appear to emanate from a slot in their parent window, and are shown with a reinforcing animation. This helps to let the user understand that the dialog is attached to the parent window, not just shown in front of it. In Big Sur and later, the parent window is greyed out, and the dialog appears on top of the middle of the parent window. No work can be done in the underlying document itself while the dialog is displayed, but the parent window can still be moved, re-sized, and minimized, and other windows can be brought in front so the user can work with them:
The same type of dialog box can be compared with the "standard" modal dialog boxes used in Windows and other operating systems.
Similarities include:
Both mechanisms have shortcomings:
|
|